﻿import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);

const routers = [
    {
        path:'/app/',
        title: 'index',
        component (resolve) {
            require(['./components/app.vue'], resolve);
        },
        children:[
		   // {
     //            path:'tenantadvice/selectByName',
     //            title: 'index',
     //            component (resolve) {
     //                require(['./views/tenantadvice/index.vue'], resolve);
     //            }
     //        },
		   // {
     //            path:'tenantbanner/selectByName',
     //            title: 'index',
     //            component (resolve) {
     //                require(['./views/tenantbanner/index.vue'], resolve);
     //            }
     //        },
		   // {
     //            path:'tenant/selectByName',
     //            title: 'index',
     //            component (resolve) {
     //                require(['./views/tenant/index.vue'], resolve);
     //            }
     //        },
     //        {
     //            path:'keyword/selectByName',
     //            title: 'index',
     //            component (resolve) {
     //                require(['./views/keyword/index.vue'], resolve);
     //            }
     //        },
            
     //        {
     //            path:'role/abc',
     //            title: 'index',
     //            component (resolve) {
     //                require(['./views/roles/index.vue'], resolve);
     //            }
     //        },
     //        {
     //            path:'role/selectByName',
     //            title: 'index',
     //            component (resolve) {
     //                require(['./views/rolesmanager/index.vue'], resolve);
     //            }
     //        },
     //        {
     //            path:'mage/selectByName',
     //            title: 'index',
     //            component (resolve) {
     //                require(['./views/mage/index.vue'], resolve);
     //            }
     //        },
     //        {
     //            title: 'detail',
     //            path:'detail/:id',
     //            component (resolve) {
     //                require(['./views/detail/detail.vue'], resolve);
     //            }
     //        },
     //        {
     //            path:'tree',
     //            title: 'index',
     //            component (resolve) {
     //                require(['./views/tree/index.vue'], resolve);
     //            }
     //        },
            {
                path:'user/selectByName',
                title: 'index',
                component (resolve) {
                    require(['./views/user/index.vue'], resolve);
                }
            },
            {
                path:'index',
                title: 'index',
                component (resolve) {
                    require(['./views/index/index.vue'], resolve);
                }
            },
        	{
                path:'menu/getMenuTree',
                title: 'index',
                component (resolve) {
                    require(['./views/menu/index.vue'], resolve);
                }
            },
            {
                path:'merchant',
                title: 'index',
                component (resolve) {
                    require(['./views/merchant/index.vue'], resolve);
                }
            },
            {
                path:'store',
                title: 'index',
                component (resolve) {
                    require(['./views/store/index.vue'], resolve);
                }
            },
            {
                path:'ma',
                title: 'index',
                component (resolve) {
                    require(['./views/ma/index.vue'], resolve);
                }
            },
            {
                path:'info',
                title: 'info',
                component (resolve) {
                    require(['./views/info/info.vue'], resolve);
                }
            },
    
        ]},
    {
        path:'/login/login',
        title: 'index',
        component (resolve) {
            require(['./views/login/login.vue'], resolve);
        }
    },

    // {
    //     path:'/404',
    //     title: '404',
    //     component (resolve) {
    //         require(['./views/404/404.vue'], resolve);
    //     }
    // },
    {
      path: '*',
      redirect: '/login/login'
    }
];


// 使用 vue-router 动态修改页面标题


export default new VueRouter({
    routes:routers,
});
